function bigAdd(str1, str2) {
  //转为数组并逆序
  const arr1 = str1.split('').reverse()
  const arr2 = str2.split('').reverse()
  console.log(arr1, arr2)
  //计算最长的数组长度
  const length = Math.max(arr1.length, arr2.length)
  //逐个计算
  let flag = 0//进位标识
  let result = []//结果
  let temp = 0
  for (let i = 0; i < length; i++) {
    let a = Number(arr1[i]) || 0
    let b = Number(arr2[i]) || 0
    temp = a + b + flag
    if (temp >= 10) {
      temp = temp % 10
      flag = 1
    } else {
      flag = 0
    }
    result.push(temp)
    if ((i === length - 1) && (flag === 1)) {
      result.push(flag)
    }
  }
  return Number(result.reverse().join(''))
}

console.log(bigAdd('174982798938798', '12789238238737'))
//187772037177535
//187772037177535
// 获取5张轮播图
// https://api.douban.com/v2/movie/top250?start=0&count=5




